import Vue from 'vue'
import elementUi from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import store from './store'
import axios from 'axios'
import App from './App.vue'
import router from './router'

Vue.use(elementUi)
Vue.config.productionTip = false

axios.defaults.baseURL = '//u.bendibao.com/'
Vue.prototype.$http = axios
axios.interceptors.request.use(config => {
  let token = localStorage.getItem("token")
  if (localStorage.getItem("token")) {
    // config.headers['token']= token;
  }
  return config
}, (error) => {
  return Promise.reject(error);
})
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
